package com.koron.ticket.line.workChange.ticketchange.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.bean.annocation.FillField;
import com.koron.bean.base.BaseBean;
import com.koron.ticket.workchange.ticketchangecontent.bean.TicketChangeContent;
import com.koron.ticket.workchange.ticketchangedelay.bean.TicketChangeDelay;
import com.koron.ticket.workchange.ticketchangedirector.bean.TicketChangeDirector;
import com.koron.ticket.workchange.ticketchangeinterrupt.bean.TicketChangeInterrupt;
import com.koron.ticket.workchange.ticketchangemember.bean.TicketChangeMember;
import com.koron.ticket.workchange.ticketchangesecurityarrangement.bean.TicketChangeSecurityArrangement;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class TicketChange extends BaseBean {

    @ApiModelProperty("变更单编号")
    private String code;

    @ApiModelProperty("工作票ID")
    private String workTicketId;

    @ApiModelProperty("工作票编号")
    private String workTicketCode;

    @ApiModelProperty("工作票类型")
    private String workTicketType;

    @ApiModelProperty("申请人部门ID")
    private String deptId;

    @ApiModelProperty("申请人部门名称")
    private String deptName;

    @ApiModelProperty("变更类型(数据字典)")
    private String type;

    @ApiModelProperty("变更日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date changeDate;

    @FillField
    @ApiModelProperty(value = "创建人账号", hidden = true)
    private String createBy;

    @FillField
    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createByName;

    @FillField
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(value = "最后修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    // 下面都是业务参数

    @ApiModelProperty("工作票负责人变更列表")
    private List<TicketChangeDirector> ticketChangeDirectorList;

    @ApiModelProperty("工作票延期列表")
    private List<TicketChangeDelay> ticketChangeDelayList;

    @ApiModelProperty("工作票间断列表")
    private List<TicketChangeInterrupt> ticketChangeInterruptList;

    @ApiModelProperty("增加工作内容列表")
    private List<TicketChangeContent> ticketChangeContentList;

    @ApiModelProperty("工作班组成员变动列表")
    private List<TicketChangeMember> ticketChangeMemberList;

    @ApiModelProperty("部分安全措施变动列表")
    private List<TicketChangeSecurityArrangement> ticketChangeSecurityArrangementList;

}
